package com.itheima.dao;

import com.github.pagehelper.Page;
import com.itheima.pojo.Permission;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Set;

public interface PermissionDao {

    Set<Permission> findPermissionById(Integer roleId);

    List<Permission> findPermissionsByRoleId(int id);

    Page<Permission> findByPage(@Param("value") String queryString);

    void add(Permission permission);

    void edit(Permission permission);

    Permission findById(Integer id);

    long findInRole(Integer id);

    void delete(Integer id);

    List<Permission> findAll();

    List<Integer> findPermissionIds(Integer roleId);

}
